
cmake_minimum_required(VERSION 3.10)

project(libB)

add_library(libB STATIC libB.cpp)
set_target_properties(libB PROPERTIES DEBUG_POSTFIX "d")

target_include_directories(libB PUBLIC
        $<INSTALL_INTERFACE:${ModulesDir}/include>
)

file(GLOB_RECURSE LibB_Headers ${CMAKE_CURRENT_SOURCE_DIR}/include/*.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/*.h)
message(STATUS "LibB_Headers:${LibA_Headers}")
set_target_properties(libB PROPERTIES PUBLIC_HEADER "${LibB_Headers}") # 不能保证目录结构

install(TARGETS libB
        EXPORT ${ModulesName}
        LIBRARY DESTINATION ${ModulesDir}/lib
        ARCHIVE DESTINATION ${ModulesDir}/lib
        RUNTIME DESTINATION ${ModulesDir}/bin
        PUBLIC_HEADER DESTINATION "${ModulesDir}/include" # 不能保证目录结构
)